Component({
  properties: {
    title: {
      type: String,
      value: ''
    },
    content: {
      type: String,
      value: '\n\n\n\n'
    },
    brief: {
      type: String,
      value: '\n\n\n\n'
    },
    author: {
      type: String,
      value: '佚名'
    },
    isbottom: {
      type: Boolean,
      value: false
    },
    articleid: {
      type: Number,
      value: 0
    },
    sharing: {
      type: Boolean,
      value: false
    }
  },

  data: {},

  methods: {
    handleRoute2Article(e) {
      if (!this.properties.sharing) {
        wx.navigateTo({
          url: '/pages/article/article?id=' + this.properties.articleid,
        })
      }

    },

    handleShareButtonClick() {
      this.triggerEvent('share', {
        id: this.properties.articleid
      })
    }
  }
})